package org.example.service.impl;

import org.example.domain.Brand;
import org.example.mapper.BrandMapper;
import org.example.service.IBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 李新雨的项目86176
 * @version 1.0
 * @date 2024-12-03 10:32
 */
@Service
public class BrandServiceImpl implements IBrandService {
    @Autowired
    private BrandMapper brandMapper;
    @Override
    public void deleteByPrimaryKey(Long id) {
        brandMapper.deleteByPrimaryKey(id);
    }

    @Override
    public void insert(Brand record) {
    brandMapper.insert(record);
    }

    @Override
    public Brand selectByPrimaryKey(Long id) {
        return brandMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Brand> selectAll() {
        return brandMapper.selectAll();
    }

    @Override
    public void updateByPrimaryKey(Brand record) {
        brandMapper.updateByPrimaryKey(record);
    }
}
